public static class DbInitializer
{
    public static void Initialize(ISqlSugarClient db)
    {
        // 创建数据库
        db.DbMaintenance.CreateDatabase();
        
        // 创建表
        db.CodeFirst.InitTables(typeof(Device));
        // 添加更多实体类...
        
        // 初始化基础数据
        if (!db.Queryable<Device>().Any())
        {
            db.Insertable(new Device
            {
                DeviceName = "测试设备",
                DeviceCode = "TEST001",
                DeviceType = "测试类型",
                Status = 1,
                CreatedTime = DateTime.Now,
                IsDeleted = false
            }).ExecuteCommand();
        }
    }
}